import axios from '@/libs/api.request'
//产品列表
export const apiProductList = data => {
    return axios.request({
      url: '/product/list',
      method: 'post',
      data
    })
  }
  //详情
  export const apiProductInfo = data => {
    return axios.request({
      url: `/product/info/${data.id}`,
      method: 'post',
      data
    })
  }
//所有标签
export const apiProductAllTag = data => {
    return axios.request({
      url: '/product/all-tag',
      method: 'post',
      data
    })
  }
  //批量标记
  export const apiProductChangeLabel = data => {
    return axios.request({
      url: '/product/change-label',
      method: 'post',
      data
    })
  }
  //上下架
  export const apiProductChangeSalestatus = data => {
    return axios.request({
      url: '/product/change-salestatus',
      method: 'post',
      data
    })
  }
  //批量标签
  export const apiProductChangeTag = data => {
    return axios.request({
      url: '/product/change-tag',
      method: 'post',
      data
    })
  }
  //批量分类
  export const apiProductChangeType = data => {
    return axios.request({
      url: '/product/change-type',
      method: 'post',
      data
    })
  }
  //删除
  export const apiProductDelete = data => {
    return axios.request({
      url: '/product/delete',
      method: 'post',
      data
    })
  }
  
  //拖动排序
  export const apiProductDrag = data => {
    return axios.request({
      url: '/product/product-drag',
      method: 'post',
      headers: { 'Content-Type': 'application/json' },
      data
    })
  }
  //上下移动
  export const apiProductMove = data => {
    return axios.request({
      url: '/product/product-move',
      method: 'post',
      data
    })
  }
  //保存
  export const apiProductSave = data => {
    return axios.request({
      url: '/product/save',
      method: 'post',
      headers: { 'Content-Type': 'application/json' },
      data
    })
  }